package com.ruoyi.module.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.module.domain.DictTag;
import com.ruoyi.module.mapper.DictTagMapper;
import com.ruoyi.module.service.IDictTagService;

/**
 * 词典标签Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class DictTagServiceImpl implements IDictTagService
{
    @Autowired
    private DictTagMapper dictTagMapper;

    /**
     * 查询标签列表
     * 
     * @param dictTag 标签
     * @return 标签
     */
    @Override
    public List<DictTag> selectDictTagList(DictTag dictTag)
    {
        return dictTagMapper.selectDictTagList(dictTag);
    }

    /**
     * 查询所有标签
     * 
     * @return 标签列表
     */
    @Override
    public List<DictTag> selectDictTagAll()
    {
        return dictTagMapper.selectDictTagAll();
    }

    /**
     * 根据词典ID查询标签列表
     * 
     * @param bookId 词典ID
     * @return 标签列表
     */
    @Override
    public List<DictTag> selectDictTagListByBookId(String bookId)
    {
        return dictTagMapper.selectDictTagListByBookId(bookId);
    }

    /**
     * 根据ID查询标签
     * 
     * @param id 标签ID
     * @return 标签
     */
    @Override
    public DictTag selectDictTagById(Long id)
    {
        return dictTagMapper.selectDictTagById(id);
    }

    /**
     * 新增标签
     * 
     * @param dictTag 标签
     * @return 结果
     */
    @Override
    public int insertDictTag(DictTag dictTag)
    {
        return dictTagMapper.insertDictTag(dictTag);
    }

    /**
     * 修改标签
     * 
     * @param dictTag 标签
     * @return 结果
     */
    @Override
    public int updateDictTag(DictTag dictTag)
    {
        return dictTagMapper.updateDictTag(dictTag);
    }

    /**
     * 批量删除标签
     * 
     * @param ids 需要删除的标签ID
     * @return 结果
     */
    @Override
    public int deleteDictTagByIds(Long[] ids)
    {
        return dictTagMapper.deleteDictTagByIds(ids);
    }

    /**
     * 删除标签信息
     * 
     * @param id 标签ID
     * @return 结果
     */
    @Override
    public int deleteDictTagById(Long id)
    {
        return dictTagMapper.deleteDictTagById(id);
    }
}

